<?php

  session_start();
  include "config.php";
  include "ALorder.php";

  if(isset($_SESSION["user"]))
  {
    include "$header";
    include "$body";

?>

<div style="position:absolute; top:0px; left:1px; border:0;">
  <span class="prevPage">Cancel Order:Search > </span>
  <span class="page">Search Results</span>
</div>

<?php

  include "$H_co";

  echo "Customer No. <b>".$_SESSION["customerID"]."</b><p>";
  unset($_SESSION["order_no"]);

  if(isset($_POST["order"]))
  {
    $_SESSION["order_no"] = $_POST["order"];
    echo "<SCRIPT language='Javascript'>";
    echo "  window.location.href = 'cancelOrder_2confirmCancellation.php';";
    echo "</SCRIPT>";
  }

?>

<p>
<b>LEGEND:<br></b>
<table cellpadding="0" cellspacing="5" width="70%">
  <tr>
    <td style="border:1px solid #000000" align="center">
      <b>P</b> = Pending
    </td>
    <td style="border:1px solid #000000" align="center">
      <b>D</b> = Dispatched (cancellation will not be allowed)
    </td>
  </tr>
</table>
<p>
<form name="orderResults" action="" method="post">
  <table width="99%" style="border:1px solid #000000">
    <tr>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Cancel</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Order No.</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Date Ordered</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Order<br>Status</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Product No.</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Item No.</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Product Type</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Colour</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Size</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Description</b></font>
      </td>
      <td style="border:1px solid #000000; background-color:#666666;">
        <font color="#FFFFFF"><b>Price</b></font>
      </td>
    </tr>

<?php

getOrderDetails($_SESSION["customerID"], "", "", "");

?>

  </table>
</form>
</BODY>

<?php

  include "$footer";

  }

?>